/*
 * MenuItem.h
 *
 *  Created on: Mar 2, 2011
 *      Author: DoanDung
 */

#ifndef MENUITEM_H_
#define MENUITEM_H_

#include <MAUI/Label.h>
#include <MAUI/Image.h>
#include <MAUtil/Environment.h>

using namespace MAUI;
using namespace MAUtil;

class MenuItem : public Widget, public PointerListener
{
	public:
		MenuItem(int x, int y, int height, int width, Widget* parent);
		~MenuItem();

		void setTitleFont(Font* font);
		void setTitle(String title);
		const String& getTitle();

		void setNextImage(MAHandle nextImage);

		//PointerListener
		void pointerPressEvent(MAPoint2d p);
		void pointerMoveEvent(MAPoint2d p);
		void pointerReleaseEvent(MAPoint2d p);

		void setSelected(bool selected = true);

		//Widget requirement
		void drawWidget();

	private:
		Label* mTitle;
		Image* mNextImage;
		bool mListening;
};

#endif /* MENUITEM_H_ */
